<template>
	<div class="model">
		<h2>审核详情<span @click="close">&times;</span></h2>
		<div class="content" v-loading="loading">
			<ul v-if="dianbi">
				<li>
					<div>提现用户:&nbsp;&nbsp;</div>
					<div class="member">
						<img :src="dianbi.sale_man.head_img" alt="" />
						{{dianbi.sale_man.real_name}}
					</div>
				</li>
				<li>
					<div>审核人:&nbsp;&nbsp;</div>
					<div class="member">
						<img :src="dianbi.checker.head_img" alt="" />
						{{dianbi.checker.real_name}}
					</div>
				</li>
				<li>
					<span>提现申请日期:&nbsp;&nbsp;</span>
					<span>{{dianbi.dianbi_time | formatTime}}</span>
				</li>
				<li >
					<span>审核日期:&nbsp;&nbsp;</span>
					<span>{{dianbi.check_time | formatTime}}</span>
				</li>
				<li v-if="dianbi.reject_reason" class="reject">
					<div class="title">拒绝理由</div>
					<div class="reason">{{dianbi.reject_reason}}</div>
				</li>
			</ul>
		</div>

	</div>
</template>

<script>
	export default {
		created(){
			this.fetchManagerDetail();
		},
		props: ["id", "reason"],
		data() {
			return {
				loading: true,
				dianbi: null
			}
		},
		methods: {
			close() {
				this.$parent.showModel = false;
			},
			fetchManagerDetail() {
				this.loading = true;
//				var url = `${this.url}/wallet/dianbi_get_info.action`;
				var params = {
					token: "3960c4db11d44c018898258d63d95bd0",
					bi_ask_id: this.id
				};
				this.$http.get(url,{ params }).then((res)=> {
					this.loading = false;
					this.dianbi = res.data.result;
				});
			}
		},
		computed: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.model {
		position: fixed;
		width: 600px;
		height: 500px;
		background: #fafafa;
		z-index: 999;
		border-radius: 15px;
		left: calc(50% - 300px);
		top: calc(50% - 250px);
		box-shadow: 0 0 10px #bbb;
		>h2 {
			padding: 1rem 2rem;
			border-bottom: 1px solid #ccc;
			display: flex;
			font-weight: normal;
			color: #555;
			span {
				margin-left: auto;
				cursor: pointer;
			}
			span:hover {
				color: #aaa;
			}
		}
	}
	.content {
		padding: 1rem 2rem; 
		height: 400px;
		overflow-y: auto;
		font-size: 14px;
		color: #444;
		li {
			width:100%;
			padding-bottom: 1rem;
			.title {
				color: #f60;
				padding: 10px 0;
				text-align: center;
				font-size: 17px;
			}
			.reason {
				border: 1px dashed #aaa;
				min-height: 50px;
				text-align: center;
				padding: 1rem;
			}
			.member {
				display: flex;
				align-items: center;
				margin-top: 5px;
				img {
					margin-right: 5px;
					width: 50px;
					height: 50px;
					border-radius: 50%;
				}
			}

		}
	}
	


	
</style>